
/* --------------------------------------- Include Files ---------------------------------------- */
#include "common.h"
#include "stm32f10x.h"
#include "system_timer.h"
#include "driver.h"
#include "led.h"

/* ---------------------------------------- Macro Defines --------------------------------------- */


/* --------------------------------- Global Function Prototypes --------------------------------- */
uint32_t Led_initModule(void);
uint32_t Led_ctrlLEDUser(uint32_t);

/* -------------------------------------- Static Variables -------------------------------------- */

/**
  * @brief  Led_initModule
  * @param
  * @retval
  * @brief
  */
uint32_t Led_initModule()
{
    /* LEDs Off*/
    Led_ctrlLEDUser(0x00);

    return 0x01;
}


/**
  * @brief  Led_ctrlLEDUser
  * @param  ctrl_onoff
  *         - 0 ON; - 1 OFF
  * @retval
  * @brief
  */
uint32_t Led_ctrlLEDUser(uint32_t ctrl_onoff)
{
    if (ctrl_onoff == 0x01)
    {
        Dio_writePinValue(0, 0x00);
        return 0x01;
    }
    else if (ctrl_onoff == 0x00)
    {
        Dio_writePinValue(0, 0x01);
        return 0x01;
    }
    else
    {
        return 0x00;
    }
}
